package edu.zut.hb.software.train.MachineManager.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import edu.zut.hb.software.base.service.impl.GenericManagerImpl;
import edu.zut.hb.software.train.Machine.dao.MachineDao;
import edu.zut.hb.software.train.Machine.domain.Machine;
import edu.zut.hb.software.train.MachineManager.service.MachineManger;




@Service("MachineManger")
public class MachineMangerImpl extends GenericManagerImpl<Machine, Long> implements MachineManger {

	
	MachineDao machineDao;
	
	@Autowired
	public void setMachineDao(MachineDao machineDao) {
		this.machineDao = machineDao;
		this.dao = this.machineDao;
	}

	@Override
	public List<Machine> getAll() {
		List<Machine> all = this.machineDao.findAll();
		if (logger.isInfoEnabled()) {
			logger.info("getAll() - List<Machine> all={}", all); //$NON-NLS-1$
		}
		return all;
	}
 
}